<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2018-7-6
  Time: 17:15
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ include file="/WEB-INF/jsp/sys/css.jsp"%>
<html>
<head>
    <title>陕西省发展与改革委员会协同办公政务一体化平台_全文检索</title>
    <link rel="stylesheet" href="${cp:SYS_VALUE('app.staticfile.home')}/vue/css/essearch.css"  media="all">
</head>
<body link="#0000cc">
<div class="wrapcontent">
<div class="header_search">
        <table>
            <tr>
                <td><input type="text" name="searchContent" id="searchContent" autocomplete="off" class="layui-input" value="${param.queryWord}"></td>
                <td><a class="layui-btn"  onclick="searchcontent()">搜索</a></td>
            </tr>
            <tr>
                <td>
                    <form class="layui-form" action="">
                    <input name="type" title="文件" type="radio" checked="" value="file">
                    <input name="type" title="数据" type="radio" value="object">
                    </form>
                </td>
            </tr>
        </table>

</div>
    <div id="container">

    </div>
</div>
</body>
<script>
    var layer;
    var index;
    layui.use(['form','layer'], function(){
        var form = layui.form;
        layer=layui.layer;
        searchcontent();
    });
    function searchcontent(){
         index = layer.load(0, {shade: false});
        $("#container").empty();
        var url="${cp:SYS_VALUE('app.staticfile.home')}/system/search/esSearch/search";
        var searchContent=$("#searchContent").val();
        var type=$('.header_search input[name="type"]:checked ').val();
        searchContent=escape (encodeURIComponent(searchContent));
        url+="?queryWord="+searchContent+"&type="+type;
        $("#container").load(url);

    }
function closeLoading(){
    layer.close(index);
}
    function escapeCharactor(val){
        return val.replace(new RegExp("<","g"),"&lt;").replace(new RegExp(">","g"),"&gt;");
    }

</script>
</html>
